{% extends "base.jinja" %}

{% block title %}{{user}}的个人空间{% endblock %}
{% block keywords %}{{user}},{{site_options.keyword}}{% endblock %}
{% block description %}{{user}}的个人空间{% endblock %}

{% block css %},user.css{% endblock %}

{% block pagetype %}user-setting{% endblock %}

{% block main %}
    {%- include 'user/head.jinja' -%}

    <div class="layout p-usetting" id="u-setting">
        <div class="us-success">修改已保存</div>
        <div class="us-side">
            <ul>
                {% if user_home.group_id ==3 %}
                <li class="active"><a href="/u/setting/biz/">商家设置</a></li>
                {% endif %}
                <li><a href="/u/setting/info/">个人设置</a></li>
            </ul>
        </div>
        <div class="us-main">
            <div class="usm-tab" id="usm-tab">
                <ul>
                    <li><a href="#business">营业信息</a></li>
                    <li><a href="#audit">商家资料</a></li>
                </ul>
            </div>
            <div class="usm-box" id="usm-box">
                <div class="usm-item us-business" id="us-business">
                    <form method="post">
                        <input type="hidden" name="csrfmiddlewaretoken" value="{{csrf_token}}" />
                        <table>
                            <tbody>
                                <tr>
                                    <th width="80"><span>简介：</span></th>
                                    <td>
                                        <textarea name="content" rows="5" class="inp-atext">{{supplier_data.content}}</textarea>
                                    </td>
                                </tr>
                                <tr>
                                    <th><span>营业电话：</span></th>
                                    <td>
                                        <input type="text" size="44" class="inp-text" name="business_tel" value="{{supplier_data.business_tel}}" />
                                    </td>
                                </tr>
                                <tr>
                                    <th><span>营业时间：</span></th>
                                    <td>
                                        <input type="text" size="44" class="inp-text" name="business_time" value="{{supplier_data.business_time}}" />
                                    </td>
                                </tr>
                                <tr>
                                    <th><span>官网：</span></th>
                                    <td>
                                        <input type="text" size="44" class="inp-text" name="site" value="{{supplier_data.site}}" />
                                    </td>
                                </tr>
                                <tr>
                                    <th><span>微博地址：</span></th>
                                    <td>
                                        <input size="44" type="text" class="inp-text" name="weibo" value="{{supplier_data.weibo}}" />
                                    </td>
                                </tr>
                                <tr>
                                    <th><span>我的微信号：</span></th>
                                    <td>
                                        <input size="44" type="text" class="inp-text" name="weixin" value="{{supplier_data.weixin}}" />
                                    </td>
                                </tr>
                                <tr>
                                    <th><span>客服QQ：</span></th>
                                    <td>
                                        <input size="44" type="text" class="inp-text" name="qq" value="{{supplier_data.qq}}" />
                                    </td>
                                </tr>
                                <tr>
                                    <th><span>电子邮箱：</span></th>
                                    <td>
                                        <input size="44" type="text" class="inp-text" name="email" value="{{supplier_data.email}}" />
                                    </td>
                                </tr>
                            </tbody>
                            <tfoot>
                                <tr>
                                    <th></th>
                                    <td><a href="javascript:;" class="inp-btn-pk">保存</a></td>
                                </tr>
                            </tfoot>
                        </table>
                    </form>
                </div>
                <div class="usm-item us-audit">
                    <table>
                        <tr>
                            <th width="80"><span>商家名称</span></th>
                            <td>{{supplier_data.company}}</td>
                        </tr>
                        <tr>
                            <th><span>服务分类</span></th>
                            <td>
                                <ul>
                                {% for t in service_type %}
                                    <li>{{t.service.name}}</li>
                                {% endfor %}
                                </ul>
                            </td>
                        </tr>
                        <tr>
                            <th><span>所在城市</span></th>
                            <td>{{supplier_data.city.province.name}} - {{supplier_data.city.name}}</td>
                        </tr>
                        <tr>
                            <th><span>实体店地址</span></th>
                            <td>{{supplier_data.address}}</td>
                        </tr>
                        <tr>
                            <th><span>服务地域范围</span></th>
                            <td>
                                <ul>
                                {% for a in service_area %}
                                    <li>{{a.city.name}}</li>
                                {% endfor %}
                                </ul>
                            </td>
                        </tr>

                        <tr>
                            <th><span>联系人姓名</span></th>
                            <td>{{supplier_data.name}}</td>
                        </tr>
                        <tr>
                            <th><span>移动电话</span></th>
                            <td>{{supplier_data.phone}}</td>
                        </tr>

                        <tr>
                            <th><span>固定电话</span></th>
                            <td>{{supplier_data.tel}}</td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>
{% endblock %}

{% block script %}
<script>seajs.use('page/user/setting', function(p){p.render();});</script>
{% endblock %}